//@author A0101119Y
#ifndef STORAGEMGR_H
#define STORAGEMGR_H

#include <iostream>
#include <string>
#include <vector>
#include "CommonObjects.h"
#include "DbMgr.h"
#include "GCalMgr.h"

namespace Twentyfifth {
	class StorageMgr {
	private:
		DbMgr database;
		GCalMgr gcalmgr;
		Task previousState;
	public:
		StorageMgr();
		StorageMgr(std::string filename);
		~StorageMgr();
		Status addTask(Task task);
		Status searchTasks(std::string searchString);
		Status searchTasks(DateTime searchDate);
		Status viewTasks();
		Status viewTask(int id);
		Status editTask(int id, TaskParams param, DateTime newValue);
		Status editTask(int id, TaskParams param, std::string newValue);
		Status editTask(int id, TaskParams param, bool newValue);
		Status deleteTask(int id, bool isPermanent = false);
		Status undeleteTask(int id);
		Status clearTasks();
		Status executeGCal(std::string userCommand);
	};
}

#endif
